﻿
using B.S.BasicData.Api.Read.Application.Command.Equipment;
using B.S.BasicData.Api.Read.Dtos;
using B.S.BasicData.ErrorCode;
using B.S.BasicData.Infrastructure.Utils;
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace B.S.BasicData.Api.Read.Controllers
{
    /// <summary>
    /// 账号读控制器
    /// </summary>
    [Route("api/[controller]/[action]")]
    [ApiController]
    [Authorize]
    public class EquipmentController : ControllerBase
    {
        private readonly IMediator mediator;

        public EquipmentController(IMediator mediator)
        {
            this.mediator = mediator;
        }
        /// <summary>
        /// 查询所有分页的接口
        /// </summary>
        /// <param name="request"></param>
        /// <returns></returns>
        [HttpGet]
        [AllowAnonymous]
        public Task<ApiPaging<EquipmentDTO>> QueryAccount([FromQuery] QueryEquipmentComand request)
        {
            return mediator.Send(request);
        }

     

    }
}
